package com.regent.central.bill.core;

import com.regent.central.bill.common.SaleOrderType;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Table(name = "central_bill_sale_order")
public class SaleOrder {
    /**
     * 销售单ID
     */
    @Id
    private String id;

    /**
     * 老板组织ID
     */
    @Column(name = "boss_unit_id")
    private String bossUnitId;

    /**
     * 组织ID
     */
    @Column(name = "unit_id")
    private String unitId;

    @Column(name = "type")
    private SaleOrderType type;

    @Column(name = "order_day")
    private String orderDay;

    /**
     * 订单编号
     */
    @Column(name = "order_no")
    private Integer orderNo;

    /**
     * 客户ID
     */
    @Column(name = "customer_id")
    private String customerId;

    /**
     * 收货地址
     */
    @Column(name = "address_id")
    private String addressId;

    /**
     * 跟单人ID
     */
    @Column(name = "merchandiser_id")
    private String merchandiserId;

    private BigDecimal oddment;

    /**
     * 现场发货
     */
    @Column(name = "delivery_on_scene")
    private Boolean deliveryOnScene;

    /**
     * 已改过价
     */
    @Column(name = "price_changed")
    private Boolean priceChanged;

    /**
     * 本单应付
     */
    @Column(name = "amount_expected")
    private BigDecimal amountExpected;

    /**
     * 总收/退款金额
     */
    @Column(name = "amount_arrived")
    private BigDecimal amountArrived;

    /**
     * 总核进/核出金额
     */
    @Column(name = "amount_cleared")
    private BigDecimal amountCleared;

    @Column(name = "amount_cleared_in")
    private BigDecimal amountClearedIn;

    @Column(name = "amount_cleared_out")
    private BigDecimal amountClearedOut;

    /**
     * 结欠
     */
    @Column(name = "amount_remain")
    private BigDecimal amountRemain;

    /**
     * 销售总数
     */
    @Column(name = "total_sold")
    private BigDecimal totalSold;

    /**
     * 开单总数
     */
    @Column(name = "total_created")
    private BigDecimal totalCreated;

    /**
     * 改欠货总数
     */
    @Column(name = "total_modified")
    private BigDecimal totalModified;

    @Column(name = "total_modified_inc")
    private BigDecimal totalModifiedInc;

    @Column(name = "total_modified_dec")
    private BigDecimal totalModifiedDec;

    /**
     * 退货总数
     */
    @Column(name = "total_returned")
    private BigDecimal totalReturned;

    /**
     * 发货总数
     */
    @Column(name = "total_delivered")
    private BigDecimal totalDelivered;

    /**
     * 订单总欠货数
     */
    @Column(name = "total_owed")
    private BigDecimal totalOwed;

    /**
     * 总开单金额
     */
    @Column(name = "amount_created")
    private BigDecimal amountCreated;

    /**
     * 总改欠货金额
     */
    @Column(name = "amount_modified")
    private BigDecimal amountModified;

    @Column(name = "amount_modified_inc")
    private BigDecimal amountModifiedInc;

    @Column(name = "amount_modified_dec")
    private BigDecimal amountModifiedDec;


    /**
     * 总退货金额
     */
    @Column(name = "amount_returned")
    private BigDecimal amountReturned;

    /**
     * 打印次数
     */
    private Integer printed;

    /**
     * 是否已作废
     */
    private Boolean canceled;

    /**
     * 开单时间, 可能是插单时间
     */
    private Date dateOrdered;
    /**
     * 开单用户
     */
    private String userOrdered;

    /**
     * 记录版本
     */
    private Integer version;

    /**
     * 创建时间
     */
    @Column(name = "date_created")
    private Date dateCreated;

    /**
     * 创建人员
     */
    @Column(name = "user_created")
    private String userCreated;

    /**
     * 最后更新时间
     */
    @Column(name = "last_updated")
    private Date lastUpdated;

    /**
     * 最后更新人员
     */
    @Column(name = "user_updated")
    private String userUpdated;

    /**
     * 删除时间
     */
    @Column(name = "time_deleted")
    private Long timeDeleted;

    /**
     * 删除人员
     */
    @Column(name = "user_deleted")
    private String userDeleted;

    /**
     * 获取销售单ID
     *
     * @return id - 销售单ID
     */
    public String getId() {
        return id;
    }

    /**
     * 设置销售单ID
     *
     * @param id 销售单ID
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取老板组织ID
     *
     * @return boss_unit_id - 老板组织ID
     */
    public String getBossUnitId() {
        return bossUnitId;
    }

    /**
     * 设置老板组织ID
     *
     * @param bossUnitId 老板组织ID
     */
    public void setBossUnitId(String bossUnitId) {
        this.bossUnitId = bossUnitId;
    }

    /**
     * 获取组织ID
     *
     * @return unit_id - 组织ID
     */
    public String getUnitId() {
        return unitId;
    }

    /**
     * 设置组织ID
     *
     * @param unitId 组织ID
     */
    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public SaleOrderType getType() {
        return type;
    }

    public void setType(SaleOrderType type) {
        this.type = type;
    }

    /**
     * @return order_day
     */
    public String getOrderDay() {
        return orderDay;
    }

    /**
     * @param orderDay
     */
    public void setOrderDay(String orderDay) {
        this.orderDay = orderDay;
    }

    /**
     * 获取订单编号
     *
     * @return order_no - 订单编号
     */
    public Integer getOrderNo() {
        return orderNo;
    }

    /**
     * 设置订单编号
     *
     * @param orderNo 订单编号
     */
    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }

    /**
     * 获取客户ID
     *
     * @return customer_id - 客户ID
     */
    public String getCustomerId() {
        return customerId;
    }

    /**
     * 设置客户ID
     *
     * @param customerId 客户ID
     */
    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    /**
     * 获取收货地址
     *
     * @return address_id - 收货地址
     */
    public String getAddressId() {
        return addressId;
    }

    /**
     * 设置收货地址
     *
     * @param addressId 收货地址
     */
    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    /**
     * 获取跟单人ID
     *
     * @return merchandiser_id - 跟单人ID
     */
    public String getMerchandiserId() {
        return merchandiserId;
    }

    /**
     * 设置跟单人ID
     *
     * @param merchandiserId 跟单人ID
     */
    public void setMerchandiserId(String merchandiserId) {
        this.merchandiserId = merchandiserId;
    }

    /**
     * @return oddment
     */
    public BigDecimal getOddment() {
        return oddment;
    }

    /**
     * @param oddment
     */
    public void setOddment(BigDecimal oddment) {
        this.oddment = oddment;
    }

    /**
     * 获取现场发货
     *
     * @return delivery_on_scene - 现场发货
     */
    public Boolean getDeliveryOnScene() {
        return deliveryOnScene;
    }

    /**
     * 设置现场发货
     *
     * @param deliveryOnScene 现场发货
     */
    public void setDeliveryOnScene(Boolean deliveryOnScene) {
        this.deliveryOnScene = deliveryOnScene;
    }

    public Boolean getPriceChanged() {
        return priceChanged;
    }

    public void setPriceChanged(Boolean priceChanged) {
        this.priceChanged = priceChanged;
    }

    /**
     * 获取本单应付
     *
     * @return amount_expected - 本单应付
     */
    public BigDecimal getAmountExpected() {
        return amountExpected;
    }

    /**
     * 设置本单应付
     *
     * @param amountExpected 本单应付
     */
    public void setAmountExpected(BigDecimal amountExpected) {
        this.amountExpected = amountExpected;
    }

    /**
     * 获取总收/退款金额
     *
     * @return amount_arrived - 总收/退款金额
     */
    public BigDecimal getAmountArrived() {
        return amountArrived;
    }

    /**
     * 设置总收/退款金额
     *
     * @param amountArrived 总收/退款金额
     */
    public void setAmountArrived(BigDecimal amountArrived) {
        this.amountArrived = amountArrived;
    }

    /**
     * 获取总核进/核出金额
     *
     * @return amount_extra - 总核进/核出金额
     */
    public BigDecimal getAmountCleared() {
        return amountCleared;
    }

    /**
     * 设置总核进/核出金额
     *
     * @param amountCleared 总核进/核出金额
     */
    public void setAmountCleared(BigDecimal amountCleared) {
        this.amountCleared = amountCleared;
    }

    /**
     * 获取结欠
     *
     * @return amount_remain - 结欠
     */
    public BigDecimal getAmountRemain() {
        return amountRemain;
    }

    /**
     * 设置结欠
     *
     * @param amountRemain 结欠
     */
    public void setAmountRemain(BigDecimal amountRemain) {
        this.amountRemain = amountRemain;
    }

    /**
     * 获取销售总数
     *
     * @return total_sale - 销售总数
     */
    public BigDecimal getTotalSold() {
        return totalSold;
    }

    /**
     * 设置销售总数
     *
     * @param totalSold 销售总数
     */
    public void setTotalSold(BigDecimal totalSold) {
        this.totalSold = totalSold;
    }

    /**
     * 获取开单总数
     *
     * @return total_ordered - 开单总数
     */
    public BigDecimal getTotalCreated() {
        return totalCreated;
    }

    /**
     * 设置开单总数
     *
     * @param totalCreated 开单总数
     */
    public void setTotalCreated(BigDecimal totalCreated) {
        this.totalCreated = totalCreated;
    }

    /**
     * 获取改欠货总数
     *
     * @return total_modified - 改欠货总数
     */
    public BigDecimal getTotalModified() {
        return totalModified;
    }

    /**
     * 设置改欠货总数
     *
     * @param totalModified 改欠货总数
     */
    public void setTotalModified(BigDecimal totalModified) {
        this.totalModified = totalModified;
    }

    /**
     * 获取退货总数
     *
     * @return total_return - 退货总数
     */
    public BigDecimal getTotalReturned() {
        return totalReturned;
    }

    /**
     * 设置退货总数
     *
     * @param totalReturned 退货总数
     */
    public void setTotalReturned(BigDecimal totalReturned) {
        this.totalReturned = totalReturned;
    }

    /**
     * 获取发货总数
     *
     * @return total_delivered - 发货总数
     */
    public BigDecimal getTotalDelivered() {
        return totalDelivered;
    }

    /**
     * 设置发货总数
     *
     * @param totalDelivered 发货总数
     */
    public void setTotalDelivered(BigDecimal totalDelivered) {
        this.totalDelivered = totalDelivered;
    }

    /**
     * 获取订单总欠货数
     *
     * @return total_owed - 订单总欠货数
     */
    public BigDecimal getTotalOwed() {
        return totalOwed;
    }

    /**
     * 设置订单总欠货数
     *
     * @param totalOwed 订单总欠货数
     */
    public void setTotalOwed(BigDecimal totalOwed) {
        this.totalOwed = totalOwed;
    }

    /**
     * 获取总开单金额
     *
     * @return amount_ordered - 总开单金额
     */
    public BigDecimal getAmountCreated() {
        return amountCreated;
    }

    /**
     * 设置总开单金额
     *
     * @param amountCreated 总开单金额
     */
    public void setAmountCreated(BigDecimal amountCreated) {
        this.amountCreated = amountCreated;
    }

    /**
     * 获取总改欠货金额
     *
     * @return amount_modified - 总改欠货金额
     */
    public BigDecimal getAmountModified() {
        return amountModified;
    }

    /**
     * 设置总改欠货金额
     *
     * @param amountModified 总改欠货金额
     */
    public void setAmountModified(BigDecimal amountModified) {
        this.amountModified = amountModified;
    }

    /**
     * 获取总退货金额
     *
     * @return amount_return - 总退货金额
     */
    public BigDecimal getAmountReturned() {
        return amountReturned;
    }

    /**
     * 设置总退货金额
     *
     * @param amountReturned 总退货金额
     */
    public void setAmountReturned(BigDecimal amountReturned) {
        this.amountReturned = amountReturned;
    }

    /**
     * 获取打印次数
     *
     * @return printed - 打印次数
     */
    public Integer getPrinted() {
        return printed;
    }

    /**
     * 设置打印次数
     *
     * @param printed 打印次数
     */
    public void setPrinted(Integer printed) {
        this.printed = printed;
    }

    /**
     * 获取是否已作废
     *
     * @return canceled - 是否已作废
     */
    public Boolean getCanceled() {
        return canceled;
    }

    /**
     * 设置是否已作废
     *
     * @param canceled 是否已作废
     */
    public void setCanceled(Boolean canceled) {
        this.canceled = canceled;
    }

    /**
     * 获取记录版本
     *
     * @return version - 记录版本
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * 设置记录版本
     *
     * @param version 记录版本
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * 获取创建时间
     *
     * @return date_created - 创建时间
     */
    public Date getDateCreated() {
        return dateCreated;
    }

    /**
     * 设置创建时间
     *
     * @param dateCreated 创建时间
     */
    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }

    /**
     * 获取创建人员
     *
     * @return user_created - 创建人员
     */
    public String getUserCreated() {
        return userCreated;
    }

    /**
     * 设置创建人员
     *
     * @param userCreated 创建人员
     */
    public void setUserCreated(String userCreated) {
        this.userCreated = userCreated;
    }

    /**
     * 获取最后更新时间
     *
     * @return last_updated - 最后更新时间
     */
    public Date getLastUpdated() {
        return lastUpdated;
    }

    /**
     * 设置最后更新时间
     *
     * @param lastUpdated 最后更新时间
     */
    public void setLastUpdated(Date lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    /**
     * 获取最后更新人员
     *
     * @return user_updated - 最后更新人员
     */
    public String getUserUpdated() {
        return userUpdated;
    }

    /**
     * 设置最后更新人员
     *
     * @param userUpdated 最后更新人员
     */
    public void setUserUpdated(String userUpdated) {
        this.userUpdated = userUpdated;
    }

    /**
     * 获取删除时间
     *
     * @return time_deleted - 删除时间
     */
    public Long getTimeDeleted() {
        return timeDeleted;
    }

    /**
     * 设置删除时间
     *
     * @param timeDeleted 删除时间
     */
    public void setTimeDeleted(Long timeDeleted) {
        this.timeDeleted = timeDeleted;
    }

    /**
     * 获取删除人员
     *
     * @return user_deleted - 删除人员
     */
    public String getUserDeleted() {
        return userDeleted;
    }

    /**
     * 设置删除人员
     *
     * @param userDeleted 删除人员
     */
    public void setUserDeleted(String userDeleted) {
        this.userDeleted = userDeleted;
    }

    public Date getDateOrdered() {
        return dateOrdered;
    }

    public void setDateOrdered(Date dateOrdered) {
        this.dateOrdered = dateOrdered;
    }

    public String getUserOrdered() {
        return userOrdered;
    }

    public void setUserOrdered(String userOrdered) {
        this.userOrdered = userOrdered;
    }

    public BigDecimal getAmountClearedIn() {
        return amountClearedIn;
    }

    public void setAmountClearedIn(BigDecimal amountClearedIn) {
        this.amountClearedIn = amountClearedIn;
    }

    public BigDecimal getAmountClearedOut() {
        return amountClearedOut;
    }

    public void setAmountClearedOut(BigDecimal amountClearedOut) {
        this.amountClearedOut = amountClearedOut;
    }

    public BigDecimal getTotalModifiedInc() {
        return totalModifiedInc;
    }

    public void setTotalModifiedInc(BigDecimal totalModifiedInc) {
        this.totalModifiedInc = totalModifiedInc;
    }

    public BigDecimal getTotalModifiedDec() {
        return totalModifiedDec;
    }

    public void setTotalModifiedDec(BigDecimal totalModifiedDec) {
        this.totalModifiedDec = totalModifiedDec;
    }

    public BigDecimal getAmountModifiedInc() {
        return amountModifiedInc;
    }

    public void setAmountModifiedInc(BigDecimal amountModifiedInc) {
        this.amountModifiedInc = amountModifiedInc;
    }

    public BigDecimal getAmountModifiedDec() {
        return amountModifiedDec;
    }

    public void setAmountModifiedDec(BigDecimal amountModifiedDec) {
        this.amountModifiedDec = amountModifiedDec;
    }
}